<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="./css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/style.css" />
    <link rel="stylesheet" type="text/css" href="./css/font-awesome.min.css" />
    <script type="text/javascript" src="./script/jquery.min.js"></script>
    <script type="text/javascript" src="./script/doT.min.js"></script>
    <link class="theme" rel="stylesheet" type="text/css" href="./css/color/blue.css" />


</head>

<body>
  <div class="head">
    <div class="head-s">
      <span>用户中心</span>
      <div class="head-l"><i class="fa fa-caret-left" onclick="api.closeWin()"></i></div>
      <!-- <div class="head-r"><i class="fa fa-user"></i></div> -->
    </div>
  </div>

  <!-- <header class="aui-bar aui-bar-nav header">
      <a class="aui-pull-left">
        <span class="aui-iconfont aui-icon-left"  onclick="api.closeWin()"></span>
  </a>
      <div class="aui-title">用户中心</div>
      <a class="aui-pull-right aui-btn">
          <span class="fa fa-user-circle-o" onclick="user()"></span>
      </a>
  </header> -->
    <div class="header-d"></div>

    <div id="list">
    </div>

    <div class="user">
        <ul class="aui-list aui-list-in">
          <li class="aui-list-item aui-list-item-middle">
              <div class="aui-list-item-inner aui-list-item-arrow" onclick="changeColor()">
                  <div class="aui-list-item-title">风格</div>
              </div>
          </li>
            <li class="aui-list-item aui-list-item-middle">
                <div class="aui-list-item-inner aui-list-item-arrow" onclick="password()">
                    <div class="aui-list-item-title">修改密码</div>
                </div>
            </li>
            <li id='li'>
                <div id='data1'>
                    <div id='data2'></div>
                </div>
            </li>
        </ul>
    </div>




</body>
<script type="text/javascript" src="./script/api.js"></script>

</html>
<script>
    $('#data2').click(function() {
        api.openWin({
            name: 'userlist',
            url: './userlist.html',
        });
    })

    function password() {
        api.openWin({
            name: 'password',
            url: './password.html',
        });
    }

    apiready = function() {
      var color = $api.getStorage('color');
      $(".theme").attr("href", color);

        var user = $api.getStorage('currentUser');
        if (user == 'superman') {
            $("#li").addClass('aui-list-item');
            $("#data1").addClass('aui-list-item-inner aui-list-item-arrow');
            $("#data2").addClass('aui-list-item-title');
            $("#data2").html('用户列表');
        }
    }

    function userColor() {
      var color = $api.getStorage('color');
      $(".theme").attr("href", color);

    }


      function changeColor() {
        api.openWin({
            name: 'color',
            url: './color.html',
        });

      }



</script>
